/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session05;

import java.util.List;
import java.util.Vector;
import session05.SinhVien;

/**
 *
 * @author macbookpro
 */
public class WildcardsGeneric  {
    public static <T extends SinhVien> void showInfo(T t){
        System.out.println(t.getRollNo() + " - " + t.getName() + " - " + t.toString());
    }
    public static void main(String[] args) {
        
        SinhVien<Integer> s1 = new SinhVien();
        s1.setRollNo(12);
        s1.setName("abc");
        showInfo(s1);
        
        SinhVienAptech s2 = new SinhVienAptech();
        s2.setRollNo("R00001");
        s2.setName("xyz");
        showInfo(s2);
        //Khong dung duoc
//        showInfo("abcdef");
        
        
    }
}
